package com.bolt.support.desensitization.annotation;

import com.bolt.support.desensitization.autoconfigure.DesensitizationAutoConfiguration;
import org.aspectj.weaver.tools.PointcutPrimitive;
import org.springframework.context.annotation.Import;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Import(DesensitizationAutoConfiguration.class)
public @interface EnableDesensitization {
    /**
     * 脱敏配置参数，其中{@link #pointcutExpression 切点表达式}只支持以下几种AspectJ切点表达式原语：
     * <ul>
     * <li>{@link PointcutPrimitive#EXECUTION}</li>
     * <li>{@link PointcutPrimitive#ARGS}</li>
     * <li>{@link PointcutPrimitive#REFERENCE}</li>
     * <li>{@link PointcutPrimitive#THIS}</li>
     * <li>{@link PointcutPrimitive#TARGET}</li>
     * <li>{@link PointcutPrimitive#WITHIN}</li>
     * <li>{@link PointcutPrimitive#AT_ANNOTATION}</li>
     * <li>{@link PointcutPrimitive#AT_WITHIN}</li>
     * <li>{@link PointcutPrimitive#AT_ARGS}</li>
     * <li>{@link PointcutPrimitive#AT_TARGET}</li>
     * </ul>
     */
    String pointcutExpression() default "";
}